﻿#ifndef SETUP2WIND_H
#define SETUP2WIND_H

#include <QWidget>
#include "infochange.h"
#include "ui_infochange.h"
#include <QPushButton>
#include <dbHelper.h>
#include <QDebug>
#include <mainwindow.h>
#include <intListener.h>
#include "tcts.h"

namespace Ui {
class setup2wind;
}

class setup2wind : public QWidget
{
    Q_OBJECT

public:
    explicit setup2wind(QWidget *parent = 0);
    ~setup2wind();

signals:
    void changeTotalWindow();

private slots:
    void on_returnBtn_clicked();
    void on_SaveBtn_clicked();
    void on_pushButton_9_clicked();
    void doorStatusChanged();
    void on_comboBox_currentTextChanged(const QString &arg1);

    void on_comboBox_2_currentTextChanged(const QString &arg1);

    void on_comboBox_3_currentTextChanged(const QString &arg1);

    void on_tabWidget_currentChanged(int index);

    void add_clicked();
    void set_clicked();
    void del_clicked();


    void on_tableWidget_cellChanged(int row, int column);

    void on_tableWidget_2_cellChanged(int row, int column);

    void on_tableWidget_3_cellChanged(int row, int column);

private:
    void showEvent(QShowEvent *event) override;
    void refComboxInfo();

private:
    Ui::setup2wind *ui;
    infoChange *infoch;
    TcpClient *tcpClient;
    CommonHelper *common;
    void refTableData();
    tcts *tcts1;
};

//自定义tabbar的样式
class CustomTabStyle4:public QProxyStyle{
public:
    CustomTabStyle4(){}
    QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const;
    void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const;
};

#endif // SETUP2WIND_H
